/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package belf.migrate.engine.admin.taskconf;

public enum JobMode {
    ONCE("ONCE", "仅执行一次"),  // 仅仅执行一次，如表结构同步任务
    BATCH("BATCH", "批量执行"),     // 重复批量执行。比如用JDBC通过轮询去同步源端数据
    STREAMING("STREAMING", "流式同步数据");  // 以流式方式持续执行，比如Debezium CDC机制

    private final String name;  //在数据库表migration_task中JobMode保存的字符串形式（是一个enum字段）
    private final String desc;  //描述信息，用于web console展示

    JobMode(String name, String desc) {
        this.name = name;
        this.desc = desc;
    }

    public String getName() {
        return name;
    }

    public String getDesc() {
        return desc;
    }
}
